<template>
    <view class="order_search">
        <nut-input v-model="keyWord" placeholder="请输入运单号或订单号">
            <template #left>
                <!-- <Search /> -->
                <image class="left" src="@/assets/images/homePage/shouye_icon_sousuo.png"/>
            </template>
            <template #right>
                <Scan />
            </template>
        </nut-input>
        <button class="btn" @click="goSearch">立即查询</button>
    </view>
</template>
    
<script setup lang='ts'>
// import { Search } from '@nutui/icons-vue-taro';
import Scan from '../../Scan/index.vue'
import Taro from '@tarojs/taro';
import { ref } from 'vue';
import useOrderStore from '@/store/order'

const orderStore = useOrderStore()

const keyWord = ref('')

function goSearch() {
    orderStore.keywords = keyWord.value
    Taro.navigateTo({
        url: `../search/index`
    })
}

</script>
    
<style lang="scss">
.order_search {
    width: 700rpx;
    height: 264rpx;
    background-color: #fff;
    border-radius: 20rpx;
    padding: 24rpx;
    box-sizing: border-box;
    margin-bottom: 20rpx;
    .nut-input{
        background-color: #f5f5f5;
        border-radius: 20rpx;
    }
    .left{
        width: 40rpx;
        height: 40rpx;
    }
    .btn {
        width: 654rpx;
        height: 80rpx;
        border-radius: 40rpx;
        margin-top: 40rpx;
        background-color: #0966ff;
        color: #fff;
        font-size: 28rpx;
        line-height: 80rpx;
    }
}
</style>